/// 存储全局登录状态
static LOGIN_STATUS: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);

/// 设置登录状态值，避免多窗口的问题
#[tauri::command]
pub fn set_login_status(status: bool) -> bool {
    LOGIN_STATUS.store(status, std::sync::atomic::Ordering::Relaxed);
    status
}

/// 获取当前登录状态值
#[tauri::command]
pub fn get_login_status() -> bool {
    LOGIN_STATUS.load(std::sync::atomic::Ordering::Relaxed)
}
